// 用户模块
import request from '@/utils/request'
import qs from 'qs'
export const login = (data) => {
  return request({
    method: 'POST',
    url: '/front/user/login',
    // headers: { 'content-type': 'application/x-www-form-urlencoded' },
    // 如果data是普通对象，则content-type是application/json
    // 如果data是qs.stringify(data) 转换之后的数据：key=value&key=value，则content-type会被设置为
    // application/x-www-form-urlencoded
    // 如果data是FormData对象，则content-type是multipart/form-data
    data: qs.stringify(data) // axios 默认发送的是 application/json格式的数据
  })
}
export const getUserInfo = () => {
  return request({
    method: 'GET',
    url: '/front/user/getInfo'
  })
}
export const getUserPages = (data) => {
  return request({
    method: 'POST',
    url: '/boss/user/getUserPages',
    data
  })
}
export const forbidUser = (userId) => {
  return request({
    method: 'POST',
    url: '/boss/user/forbidUser',
    params: {
      userId
    }
  })
}
// # sourceMappingURL=user.js.map
